from flask import Flask
from flask_cors import CORS

# 新建服务
server = Flask("app")

CORS(server, supports_credentials=True)

# 定义路由
@server.route('/')
def index():
    return 'Hello Flask!'

# 定义路由
@server.route('/info')
def get_info():

    # 读取文件
    file = open('info.json','r',encoding='utf-8')
    data = file.read()
 

   

    return data

# 开启服务
server.run('127.0.0.1', port=8080)